home *** CD-ROM | disk | FTP | other *** search
/ Digital Background Bonanza / Digital Background Bonanza - Disc 1.iso / pc / DBB1.swf / scripts / __Packages / mx / skins / CustomBorder.as < prev    next >
Encoding:
Text File  |  2007-03-09  |  2.6 KB  |  102 lines

  1. class mx.skins.CustomBorder extends mx.skins.Border
  2. {
  3.    var __width;
  4.    var __height;
  5.    var l_mc;
  6.    var m_mc;
  7.    var r_mc;
  8.    static var symbolName = "CustomBorder";
  9.    static var symbolOwner = mx.skins.CustomBorder;
  10.    static var version = "2.0.2.126";
  11.    var className = "CustomBorder";
  12.    static var tagL = 0;
  13.    static var tagM = 1;
  14.    static var tagR = 2;
  15.    var idNames = new Array("l_mc","m_mc","r_mc");
  16.    var leftSkin = "F3PieceLeft";
  17.    var middleSkin = "F3PieceMiddle";
  18.    var rightSkin = "F3PieceRight";
  19.    var horizontal = true;
  20.    function CustomBorder()
  21.    {
  22.       super();
  23.    }
  24.    function get width()
  25.    {
  26.       return this.__width;
  27.    }
  28.    function get height()
  29.    {
  30.       return this.__height;
  31.    }
  32.    function init(Void)
  33.    {
  34.       super.init();
  35.    }
  36.    function createChildren(Void)
  37.    {
  38.    }
  39.    function draw(Void)
  40.    {
  41.       if(this.l_mc == undefined)
  42.       {
  43.          var _loc2_ = this.setSkin(mx.skins.CustomBorder.tagL,this.leftSkin);
  44.          if(this.horizontal)
  45.          {
  46.             this.minHeight = this.l_mc._height;
  47.             this.minWidth = this.l_mc._width;
  48.          }
  49.          else
  50.          {
  51.             this.minHeight = this.l_mc._height;
  52.             this.minWidth = this.l_mc._width;
  53.          }
  54.       }
  55.       if(this.m_mc == undefined)
  56.       {
  57.          this.setSkin(mx.skins.CustomBorder.tagM,this.middleSkin);
  58.          if(this.horizontal)
  59.          {
  60.             this.minHeight = this.m_mc._height;
  61.             this.minWidth += this.m_mc._width;
  62.          }
  63.          else
  64.          {
  65.             this.minHeight += this.m_mc._height;
  66.             this.minWidth = this.m_mc._width;
  67.          }
  68.       }
  69.       if(this.r_mc == undefined)
  70.       {
  71.          this.setSkin(mx.skins.CustomBorder.tagR,this.rightSkin);
  72.          if(this.horizontal)
  73.          {
  74.             this.minHeight = this.r_mc._height;
  75.             this.minWidth += this.r_mc._width;
  76.          }
  77.          else
  78.          {
  79.             this.minHeight += this.r_mc._height;
  80.             this.minWidth = this.r_mc._width;
  81.          }
  82.       }
  83.       this.size();
  84.    }
  85.    function size(Void)
  86.    {
  87.       this.l_mc.move(0,0);
  88.       if(this.horizontal)
  89.       {
  90.          this.r_mc.move(this.width - this.r_mc.width,0);
  91.          this.m_mc.move(this.l_mc.width,0);
  92.          this.m_mc.setSize(this.r_mc.x - this.m_mc.x,this.m_mc.height);
  93.       }
  94.       else
  95.       {
  96.          this.r_mc.move(0,this.height - this.r_mc.height,0);
  97.          this.m_mc.move(0,this.l_mc.height);
  98.          this.m_mc.setSize(this.m_mc.width,this.r_mc.y - this.m_mc.y);
  99.       }
  100.    }
  101. }
  102.